package com.example.demo.controller;

import com.example.demo.sys.common.PermissionException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
 * @Desc 
 * @author 蔡超
 * @date 2018/9/21 9:46
 */
@RestController
public class HelloController {

    @RequestMapping(value = "/hello")
    public String hello() {
        return "hello,Spring Boot";
    }

    @RequestMapping(value = "/hello.json")
    public String hello2() {
        throw new PermissionException("permission exception");
//        return "hello,Spring Boot";
    }

}
